<?php
require './Smarty/smarty.class.php';
$smarty = new Smarty();
$smarty->caching=true;//开启缓存
$smarty->cache_lifetime=10;//缓存的生命周期
if(date('H')<9)
    $smarty->force_cache=true;//强制更新缓存
$smarty->display('5-demo.html');